<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableGoodsLists extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods_lists', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('goods_type');
            $table->integer('link_id')->index();
            $table->integer('price');
            $table->integer('sort');
            $table->integer('sales_volume')->default(0);
            $table->integer('visitor');
            $table->dateTime('time');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('goods_lists');
    }
}
